Controlling device for controlling scan performing unit

ABSTRACT

A controlling device for controlling a scan performing unit may determine a specific optical resolution from among a plurality of optical resolutions by utilizing specific information given from a user, cause the scan performing unit to perform a scan of a document in accordance with the specific optical resolution, perform an analysis of scan data obtained by the scan of the document, determine an output resolution based on a result of the analysis of the scan data, converting the scan data indicating the specific optical resolution into image data indicating the output resolution in a case where the output resolution is not identical to the specific optical resolution, and create a file including the image data indicating the output resolution.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Japanese Patent Application No.2011-76309, filed on Mar. 30, 2011, the contents of which are herebyincorporated by reference into the present application.

TECHNICAL FIELD

The technique disclosed in the present specification relates to acontrolling device for controlling a scan performing unit.

DESCRIPTION OF RELATED ART

For example, a digital multi-function device comprising a scan functionis known. The digital multi-function device performs a scan of adocument so as to create scan data. With this technique, it isrecommended that a highest resolution usable by the digitalmulti-function device be adopted as an optical resolution for the scanof the document. Next, the digital multi-function device performs ananalysis of the scan data so as to calculate a size of the smallestcharacter included in the document. In a case where the size of thesmallest character is relatively small, the digital multi-functiondevice determines a relatively high output resolution, and in a casewhere the size of the smallest character is relatively large, thedigital multi-function device determines a relatively low outputresolution. The digital multi-function device then converts the scandata indicating the optical resolution into image data indicating thedetermined output resolution.

SUMMARY

In the technique described above, since the highest resolution is alwaysadopted as the optical resolution for performing the scan of thedocument, a difference between the optical resolution and the outputresolution tends to increase. An increased difference between theoptical resolution and the output resolution causes an increase in aprocessing load of a process (in other words, a resize process) forconverting the scan data indicating the optical resolution into theimage data indicating the output resolution. The present specificationprovides a technique that may reduce the processing load.

The present specification discloses a controlling device for controllinga scan performing unit. The controlling device may comprise one or moreprocessors, and a memory that stores a computer program includinginstructions executed by the one or more processors. The instructionsmay cause the one or more processors, when executed by the one or moreprocessors, to functions as: an optical resolution determination unitconfigured to determine a specific optical resolution from among aplurality of optical resolutions by utilizing specific information givenfrom a user; a scan controlling unit configured to cause the scanperforming unit to perform a scan of a document in accordance with thespecific optical resolution; an analysis performing unit configured toperform an analysis of scan data obtained by the scan of the document;an output resolution determination unit configured to determine anoutput resolution based on a result of the analysis of the scan data,the output resolution being a resolution for image data obtained byutilizing the scan data; a conversion unit configured to convert thescan data indicating the specific optical resolution into the image dataindicating the output resolution in a case where the output resolutionis not identical to the specific optical resolution; and a creation unitconfigured to create a file including the image data indicating theoutput resolution.

Moreover, a controlling method and a computer program for realizing thecontrolling device and a non-transitory computer-readable storage mediumthat stores the computer program are also novel and useful.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of a configuration of a communication system;

FIG. 2 shows a flow chart of a scan process;

FIG. 3 shows an example of an optical resolution determination table;

FIG. 4 shows a flow chart of an analysis process;

FIG. 5 shows a diagram for explaining contents of a character analysis;

FIG. 6 shows a diagram for explaining contents of a photo analysis;

FIG. 7 shows an example of an output resolution determination table;

FIG. 8 shows an example of an analysis process according to a secondembodiment;

FIG. 9 shows an example of an analysis performing determination table;and

FIG. 10 shows an example of an output resolution determination table.

EMBODIMENT First Embodiment

(System Configuration)

As shown in FIG. 1, a communication system 2 comprises a multi-functiondevice 10 (a peripheral device of a PC 80) and the PC 80. Themulti-function device 10 and the PC 80 are connected to a LAN 4. Themulti-function device 10 and the PC 80 are capable of communicating witheach other via the LAN 4.

(Configuration of Multi-Function Device 10)

The multi-function device 10 is capable of performing a plurality offunctions including a print function and a scan function. Themulti-function device 10 comprises an operation unit 12, a display unit14, a network interface 16, a print performing unit 18, a scanperforming unit 20, and a controlling unit 30. The respective units 12to 30 are connected to a bus line (reference numeral omitted).

The operation unit 12 comprises a plurality of keys. By operating theoperation unit 12, a user can input various instructions to themulti-function device 10. The display unit 14 is a display fordisplaying various types of information. The network interface 16 isconnected to the LAN 4. The print performing unit 18 comprises aprinting mechanism adopting an inkjet head system, a laser system, orthe like, and performs printing in accordance with an instruction fromthe controlling unit 30. The scan performing unit 20 comprises ascanning mechanism such as a CCD, a CIS, or the like, and performs ascan of a document in accordance with an instruction from thecontrolling unit 30.

The scan performing unit 20 comprises an FB (Flat Bed) mechanism 22. TheFB mechanism 22 comprises a transparent plate (not shown) and aplurality of optical elements 24 aligned in a first direction. Eachoptical element 24 may be a CCD image sensor (Charge Coupled DeviceImage Sensor) or a CIS (Contact Image Sensor). The plurality of opticalelements 24 is movable in a second direction that is perpendicular tothe first direction (the direction in which the plurality of opticalelements 24 is aligned). Therefore, by utilizing the FB mechanism 22, acolor scan of a document placed on the transparent plate can beperformed by moving the plurality of optical elements 24 in the seconddirection without having to move the document. Hereinafter, a scan of adocument placed on the transparent plate will be referred to as an “FBscan”.

The scan performing unit 20 further comprises an ADF (Auto DocumentFeeder) mechanism 26. The ADF mechanism 26 is capable of moving adocument in the second direction. Therefore, by utilizing the ADFmechanism 26, a color scan of a document can be performed by moving thedocument in the second direction without having to move the plurality ofoptical elements 24. Hereinafter, a scan of a document conveyed by theADF mechanism 26 will be referred to as an “ADF scan”. Moreover, the ADFmechanism 26 comprises a document sensor 28. The document sensor 28detects whether a document is placed on the ADF mechanism 26 or not, andsupplies a detection result to the controlling unit 30.

The controlling unit 30 comprises a CPU 32 and a memory 34. The CPU 32performs various processes in accordance with a program (not shown)stored in the memory 34. Respective functions of an optical resolutiondetermination unit 50, a scan controlling unit 52, an analysisperforming unit 54, an output resolution determination unit 60, aconversion unit 62, a creation unit 64, and a judging unit 66 arerealized due to the CPU 32 performing processes in accordance with theprogram. Moreover, the analysis performing unit 54 comprises a firstanalysis unit 56 and a second analysis unit 58.

The memory 34 is constituted by a nonvolatile memory, a volatile memory,or the like. The memory 34 comprises a scan setting storage area 36. Thememory 34 further stores tables 40 (refer to FIGS. 3 and 7). Contents ofinformation stored in the scan setting storage area 36 and contents ofthe tables 40 will be described in detail later. Moreover, the tables 40are stored in advance in the multi-function device 10 before shipping ofthe multi-function device 10. However, alternatively, the multi-functiondevice 10 may obtain (in other words, install) the tables 40 from amedium (for example, a USB memory) provided by a vendor of themulti-function device 10 or may obtain the tables 40 from a serverprovided by the vendor of the multi-function device 10.

(Configuration of PC 80)

The PC 80 comprises a network interface 82 and a controlling unit 90.The PC 80 further comprises an operation unit and a display unit (bothnot shown). The network interface 82 is connected to the LAN 4.

The controlling unit 90 comprises a CPU 92 and a memory 94. The CPU 92performs various processes in accordance with a program (for example, ascanner driver 96) stored in the memory 94. The memory 94 is constitutedby a nonvolatile memory, a volatile memory, or the like. The memory 94stores the scanner driver 96 for utilizing the scan function of themulti-function device 10. The PC 80 obtains (in other words, installs)the scanner driver 96 from a medium that is shipped together with themulti-function device 10. However, alternatively, the PC 80 may obtainthe scanner driver 96 from a server provided by the vendor of themulti-function device 10. Moreover, while FIG. 1 shows the tables 40stored in the multi-function device 10 also being included in thescanner driver 96, this configuration is utilized in a modificationwhich will be described later.

(Scan Process: FIG. 2)

Processes performed by the multi-function device 10 will now bedescribed. After placing a document at a predetermined position of themulti-function device 10, the user operates the operation unit 12 of themulti-function device 10 to input an instruction to perform a color scanto the multi-function device 10. Moreover, in a case where the userdesires to have an ADF scan performed, the user places the document onthe ADF mechanism 26. On the other hand, in a case where the userdesires to have an FB scan performed, the user places the document onthe transparent plate of the FB mechanism 22.

When the instruction for performing the color scan is inputted, thecontrolling unit 30 causes the display unit 14 to display a selectionscreen that enables the user to select scan settings. In the presentembodiment, as shown in FIG. 1, a plurality of scan setting itemsincluding “file size”, “output resolution”, and “file format” isprovided.

(File Size)

“File size” refers to a file size of a file that is a creation object(hereinafter referred to as an “object file”). In the presentembodiment, three file sizes (“large”, “medium”, and “small”) areadopted as setting values that can be designated by the user. Moreover,while three file sizes are adopted in the present embodiment, two filesizes (for example, “large” and “small”) may be adopted or four or morefile sizes may be adopted in a modification.

(Output Resolution)

“Output resolution” refers to a resolution indicated by image dataincluded in the object file. Moreover, although a detailed descriptionwill be provided later, the “output resolution” is to be distinguishedfrom an optical resolution that is utilized when the scan performingunit 20 actually performs the scan. In the present embodiment, fiveoutput resolutions (“Auto”, “600 dpi”, “300 dpi”, “200 dpi”, and “100dpi”) are adopted as setting values that can be designated by the user.As will be described later, “Auto” is a setting value that causes themulti-function device 10 to automatically determine an opticalresolution and an output resolution. Moreover, in the presentembodiment, while four output resolutions (“600 dpi”, “300 dpi”, “200dpi”, and “100 dpi”) are adopted as output resolutions having specificnumerical values, three or less or five or more output resolutions maybe adopted in a modification.

(File Format)

“File format” refers to a file format of the object file. Morespecifically, the “file format” is specified by an extension (forexample, “.jpg”, “.pdf”, and “.xps”) included in a file name of theobject file. In the present embodiment, three file formats (“JPEG (JointPhotographic Experts Group)”, “XPS (XML Paper Specification)”, and “PDF(Portable Document Format)”) are adopted as setting values that can bedesignated by the user. However, PDF is classified into six file formats(“PDF”, “PDF/A”, “Encryption PDF”, “Signature Enclosed PDF”, “SearchablePDF”, and “high-compression PDF”).

The “PDF” refers to a normal PDF that does not belong to the other fivePDF types (“PDF/A”, “Encryption PDF”, and the like). The “PDF/A” is aninternational standard established by the ISO and is a PDF designed forlong-term data storage. The “encryption PDF” is a PDF in which data isencrypted using a password. Accordingly, in a case where selecting theencryption PDF, the user additionally inputs a password. The “signatureEnclosed PDF” is a PDF enclosing a digital signature (for example, atime stamp). In a case where selecting the signature enclosed PDF, theuser must install a digital signature in the multi-function device 10 inadvance. The “searchable PDF” is a PDF enclosing characters included ina document (for example, characters read by an OCR (Optical CharacterReader)) as searchable text data. The “high-compression PDF” is a PDF inwhich a character region and a background region of a document areseparated from each other and separately compressed, with the characterregion compressed as a binary image and the background region compressedas a multi-level image. Moreover, a file size of a high-compression PDFis smaller than a file size of a normal PDF file.

Furthermore, a JPEG file having a “JPEG” file format includes image datacompressed in accordance with a JPEG compression system (hereinafterreferred to as “JPEG data”). In addition, an XPS file having an “XPS”file format and a PDF file having a “PDF” file format also include JPEGdata.

Although a detailed description will be given later, compression ratesof the JPEG data differ in correspondence with the three file sizes(“large”, “medium”, and “small”). The present embodiment defines thecompression rate as follows. More specifically, the higher thecompression rate, the smaller a data size (that is, the greater thedegree of compression) of the JPEG data (that is, image data aftercompression). In other words, the lower the compression rate, the largerthe data size (that is, the lower the degree of compression) of the JPEGdata (that is, image data after compression). In a case where arelatively large file size is designated by the user, JPEG datacompressed at a relatively low compression rate (that is, JPEG datahaving a relatively large data size) is created, and in a case where arelatively small file size is designated by the user, JPEG datacompressed at a relatively high compression rate (that is, JPEG datahaving a relatively small data size) is created.

In a state where the aforementioned selection screen is displayed, theuser operates the operation unit 12 to designate one setting value foreach of the plurality of scan setting items. In this case, in S10 ofFIG. 2, in accordance with the user selection (in other words, the userinstruction), the controlling unit 30 selects one file size from amongthe three file sizes, selects one output resolution from among the fiveoutput resolutions, and selects one file format from among the eightfile formats. In S10, the controlling unit 30 further causes the scansetting storage area 36 (refer to FIG. 1) to store the selected filesize, the selected output resolution, and the selected file format.

Next, in S12, the optical resolution determination unit 50 (refer toFIG. 1) judges whether the selected output resolution stored in the scansetting storage area 36 is “Auto” or not. In a case where the selectedoutput resolution is “Auto”, the optical resolution determination unit50 makes a judgment of YES in S12 and proceeds to S20. On the otherhand, in a case where the selected output resolution is not “Auto” or,in other words, in a case where the selected output resolution is one ofthe four output resolutions having specific numerical values, theoptical resolution determination unit 50 makes a judgment of NO in S12and proceeds to S30.

(Determination of Optical Resolution: S20)

In S20, the optical resolution determination unit 50 refers to anoptical resolution determination table 42 (refer to FIG. 3) included inthe tables 40 in the memory 34 so as to determine an optical resolution.As shown in FIG. 3, the optical resolution determination table 42 isdata representing a relationship among file sizes, file formats, andoptical resolutions.

Data in the table 42 is set so that the relatively larger the file size(in other words, “large” or “medium”), the relatively higher the opticalresolution (in other words, “600 dpi” corresponding to “JPEG”), and therelatively smaller the file size (in other words, “small”), therelatively lower the optical resolution (in other words, “300 dpi”corresponding to “JPEG”). Accordingly, the multi-function device 10 iscapable of appropriately determining the optical resolution inaccordance with the file size selected by the user.

In addition, the data in the table 42 is set so that in a case where thefile size is “large” or “medium”, the optical resolution correspondingto “JPEG” (in other words, “600 dpi”) is higher than the opticalresolution corresponding to “XPS” and “PDF” (in other words, “300 dpi”).“JPEG” is a file format not having a page concept (in other words, afile format incapable of including image data of a plurality of pages).In comparison, “PDF” and “XPS” are file formats having the page concept(in other words, file formats capable of including image data of aplurality of pages). Therefore, the data in the table 42 is set so thatan optical resolution corresponding to the file formats having the pageconcept (“PDF” and “XPS”) is lower than an optical resolutioncorresponding to the file format not having the page concept (“JPEG”).

In a case where the file format having the page concept is selected, ascan of a document having a large number of pages may potentially beperformed. In the present embodiment, since the relatively low opticalresolution is determined when the file format having the page concept isselected, the file size can be prevented from becoming excessively largein a case where the scan of the document having the large number ofpages is performed.

In S20, the optical resolution determination unit 50 determines anoptical resolution by specifying the optical resolution corresponding tothe selected file size and the selected file format stored in the scansetting storage area 36 from the optical resolution determination table42. Accordingly, by utilizing the file size and the file format givenfrom the user, the optical resolution determination unit 50 canappropriately determine an optical resolution to be utilized in theactual scan (hereinafter, referred to as a “determined opticalresolution”) from among the plurality of optical resolutions (“600 dpi”and “300 dpi”).

In S22, the scan controlling unit 52 (refer to FIG. 1) causes the scanperforming unit 20 to perform the color scan of the document. Forexample, in the case where the document is placed on the ADF mechanism26, the document sensor 28 supplies a detection signal indicating thatthe document is placed on the ADF mechanism 26 to the controlling unit30. In this case, in S22, the scan controlling unit 52 supplies the scanperforming unit 20 with a signal for operating the ADF mechanism 26 andcauses the ADF mechanism 26 to convey the document in the aforementionedsecond direction. Furthermore, the scan controlling unit 52 supplies thescan performing unit 20 with a signal for causing the plurality ofoptical elements 24 to perform the color scan in accordance with thedetermined optical resolution which had been determined in S20 (in otherwords, “600 dpi” or “300 dpi”). In doing so, the scan controlling unit52 does not supply the scan performing unit 20 with a signal for movingthe plurality of optical elements 24 in the second direction.Accordingly, the plurality of optical elements 24 in a stationary stateperforms the color scan of the document conveyed by the ADF mechanism 26in accordance with the determined optical resolution which had beendetermined in S20. In other words, the ADF scan is performed.

In addition, for example, in the case where the document is placed onthe transparent plate of the FB mechanism 22, the document sensor 28does not supply the aforementioned detection signal to the controllingunit 30. In this case, in S22, the scan controlling unit 52 supplies thescan performing unit 20 with a signal for causing the plurality ofoptical elements 24 to perform the color scan in accordance with thedetermined optical resolution which had been determined in S20, and asignal for moving the plurality of optical elements 24 in the seconddirection. Accordingly, the plurality of optical elements 24 in a movingstate performs the color scan of the document placed on the transparentplate in accordance with the determined optical resolution which hadbeen determined in S20. In other words, the FB scan is performed. Byperforming S22, the scan controlling unit 52 can obtain scan data (inother words, color image data) indicating the determined opticalresolution determined which had been determined in S20 from the scanperforming unit 20.

Next, in S24, the analysis performing unit 54 (refer to FIG. 1) performsan analysis of the scan data, and the output resolution determinationunit 60 (refer to FIG. 1) determines an output resolution (hereinafterreferred to as a “determined output resolution”) by utilizing a resultof the analysis. Contents of the analysis process performed in S24 willbe described in detail later.

Next, in S26, the conversion unit 62 and the creation unit 64 (refer toFIG. 1) create an object file including image data indicating thedetermined output resolution. In S26, first, the conversion unit 62judges whether or not the determined optical resolution that had beendetermined in S20 and the determined output resolution that had beendetermined in S24 are identical to each other.

In a case where the determined optical resolution and the determinedoutput resolution are not identical to each other, the conversion unit62 resines (in other words, converts) the scan data indicating thedetermined optical resolution (for example, “600 dpi”) into scan dataindicating the determined output resolution (for example, “300 dpi”).While a bilinear method is adopted as a resizing method in the presentembodiment, other methods may be adopted in a modification.

On the other hand, in a case where the determined optical resolution andthe determined output resolution are identical to each other, theconversion unit 62 does not resize (convert) the scan data. In otherwords, in this case, the scan data indicating the determined opticalresolution becomes equal to the image data indicating the determinedoutput resolution.

Next, the creation unit 64 compresses the image data indicating thedetermined output resolution in correspondence with the selected filesize stored in the scan setting storage area 36. Moreover, the creationunit 64 compresses the image data by utilizing the JPEG compressionsystem. The creation unit 64 compresses the image data at a firstcompression rate in a case where the selected file size is “large”,compresses the image data at a second compression rate that is higherthan the first compression rate in a case where the selected file sizeis “medium”, and compresses the image data at a third compression ratethat is higher than the second compression rate in a case where theselected file size is “small”. Accordingly, JPEG data is created.

The creation unit 64 further creates data corresponding to the selectedfile format stored in the scan setting storage area 36. For example, ina case where the selected file format is JPEG, the creation unit 64creates a file name including the JPEG extension (“.jpg”), a JPEG headerand a JPEG footer, and the like. Accordingly, an object file having aJPEG file format is completed.

In addition, for example, in a case where the selected file format isXPS, the creation unit 64 creates a file name including the XPSextension (“.xps”), a JPEG header and a JPEG footer, an XPS header andan XPS footer, data indicating a page number, and the like. Accordingly,an object file having an XPS file format is completed.

Furthermore, for example, in a case where the selected file format isone of the six PDF types shown in FIG. 1, the creation unit 64 creates afile name including the PDF extension (“.pdf”), a JPEG header and a JPEGfooter, a PDF header and a PDF footer, data indicating a page number,and the like. In addition, the creation unit 64 creates data incorrespondence with the PDF type (PDF/A, Encryption PDF, SignatureEnclosed PDF, and the like) by utilizing a known method. For example, incase of Signature Enclosed PDF, the creation unit 64 encloses an digitalsignature in the object file. Accordingly, an object file having a PDFfile format is completed.

Moreover, as described earlier, JPEG is a file format not having thepage concept. Therefore, for example, in a case where a scan of adocument including two or more pages is performed, a JPEG object filerepresenting a single-page document is created for each document page.In other words, in a case where the selected file format is JPEG and ascan of a document including Y-number of pages (where Y is an integerequal to or greater than 2) is performed, the creation unit 64 createsY-number of JPEG object files respectively having different file names.

On the other hand, PDF and XPS are file formats having a page concept.Therefore, in a case where the selected file format is PDF or XPS and ascan of a document including Y-number of pages (where Y is an integerequal to or greater than 2) is performed, the creation unit 64 creates asingle object file (in other words, a PDF file or an XPS file) includingthe JPEG data corresponding to Y-number pages representing the documentincluding the Y-number of pages. Once S26 is concluded, a transfer ismade to S40.

On the other hand, in S30, the optical resolution determination unit 50determines an optical resolution corresponding to the selected outputresolution stored in the scan setting storage area 36. In S30, arelationship between output resolutions and optical resolutions has beendetermined in advance. More specifically, in a case where the selectedoutput resolution is “600 dpi”, the optical resolution determinationunit 50 determines “600 dpi” as the optical resolution. In addition, ina case where the selected output resolution is any of “300 dpi”, “200dpi”, and “100 dpi”, the optical resolution determination unit 50determines “300 dpi” as the optical resolution.

Next, in S32, the scan controlling unit 52 causes the scan performingunit 20 to perform a scan in accordance with the determined opticalresolution which had been determined in S30 in the same manner as inS22. Next, in S34, the conversion unit 62 and the creation unit 64convert the scan data so as to create an object file in the same manneras in S26. Once S34 is concluded, a transfer is made to S40.

In S40, the controlling unit 30 transmits the object file created in S26or S34 to a destination (for example, a USB memory, the PC 80, apredetermined server, or the like) selected in advance by the user.Accordingly, the user can cause an image represented by the JPEG dataincluded in the object file (in other words, an image representing thedocument that is the scan object) to be outputted (displayed, printed,or the like). Once S40 is concluded, the scan process is concluded.

(Analysis Process: FIG. 4)

Contents of the analysis process performed in S24 of FIG. 2 will now bedescribed in detail. As shown in FIG. 4, in S100, the analysisperforming unit 54 performs a character analysis of the scan data. Morespecifically, in S100, the second analysis unit 58 (refer to FIG. 1)performs a character analysis of scan data to calculate a size of thesmallest character included in the document (hereinafter referred to asthe “smallest character point”) as an index value indicating aconfiguration of the character included in the document.

(Character Analysis of S100: FIG. 5)

Contents of the character analysis of S100 in FIG. 4 will be described.FIG. 5 shows an example of a scan image 100 represented by the scan dataobtained by the scan of the document performed in S22 in FIG. 2. In thepresent embodiment, the document includes alphabetical characters “A” to“Y” and a natural image in which a flower is present in a bluebackground. Moreover, the characters “A” to “Y” are in black and thesurroundings of the characters “A” to “Y” (in other words, a backgroundof the document) are in white. In addition, “A” to “C” have relativelylarge character sizes and “D” to “Y” have relatively small charactersizes.

Moreover, each of the plurality of pixels constituting the scan data hasan RGB pixel value. In S100, the second analysis unit 58 firstcalculates a value related to a luminance of a pixel for each of theplurality of pixels constituting the scan data. In the presentembodiment, a Y value that is utilized in a YCC color space is used asthe value related to luminance. More specifically, the second analysisunit 58 calculates a Y value of each pixel by utilizing a mathematicalformula expressed as Y=0299×R+0.587×G+0.114×B. Moreover, in amodification, for example, a V value that is utilized in an HSV colorspace or a value related to luminance in another color space may beutilized as the value related to luminance.

Moreover, an alignment of the respective pixels along the aforementionedfirst direction (the direction in which the plurality of opticalelements 24 are aligned) will be referred to as a “row”, and analignment of the respective pixels along the aforementioned seconddirection (the direction perpendicular to the first direction) will bereferred to as a “column”. The second analysis unit 58 calculates Yrsum1that is a sum of Y values of the respective pixels constituting thepixels of a first row. In a similar manner, the second analysis unit 58also calculates Yrsum2 and the like for the pixels of the second andsubsequent rows. Accordingly, M-number (where M is an integer equal toor larger than 2) of Yrsums (Yrsum1 to YrsumM) corresponding to pixelsof M-number of rows which constitute the scan data are calculated.

Next, as shown in the lower diagram of FIG. 5, the second analysis unit58 creates a histogram of the M-number of Yrsums. For example, thepixels of the first row are pixels representing only the whitebackground of the document. Therefore, since the luminance of the pixelsof the first row is high, Yrsum1 of the pixels of the first row has arelatively large value. On the other hand, the pixels of the second roware pixels representing a portion of the black characters “A” to “C”.Therefore, since the luminance of the pixels of the second row is lowerthan the luminance of the pixels of the first row which represent onlythe white background, Yrsum2 of the pixels of the second row has arelatively small value. In a similar manner, Yrsum of the pixelsrepresenting the characters “D” to “N” has a relatively small value, andYrsum of the pixels representing the characters “0” to “Y” also has arelatively small value. Furthermore, Yrsum of the pixels representingthe natural image including a blue background also has a relativelysmall value.

As is apparent from the histogram shown in. FIG. 5, the Yrsum of thepixels representing only the background and the Yrsum of the pixelsrepresenting the characters “A” to “Y” significantly differ from eachother. Therefore, a number of consecutive rows which have a relativelysmall Yrsum corresponds to a size of single character along the seconddirection. The second analysis unit 58 identifies a number ofconsecutive rows (hereinafter referred to as “consecutive row numbers”)which have a Yrsum equal to or smaller than a predetermined value.Specifically, the second analysis unit 58 identifies consecutive rownumbers corresponding to an arrow A1 representing the characters “A” to“C”, consecutive row numbers corresponding to an arrow A2 representingthe characters “D” to “N”, and consecutive row numbers corresponding toan arrow A3 representing the characters “0” to “Y”. Furthermore, sincethe Yrsum of the pixels representing the natural image is also arelatively small value, the second analysis unit 58 identifiesconsecutive row numbers corresponding to an arrow A4 despite the naturalimage not including any characters.

Next, the second analysis unit 58 identifies smallest consecutive rownumbers from the four consecutive row numbers corresponding to thearrows A1 to A4. In the present embodiment, since the consecutive rownumbers corresponding to the arrow A2 (=the consecutive row numberscorresponding to the arrow A3) is the smallest, the second analysis unit58 identifies the consecutive row numbers corresponding to the arrow A2.Since the second analysis unit 58 is already aware of unit informationfor converting a single row into a character size (in other words, unitinformation indicating how many points a single row corresponds to), thesecond analysis unit 58 is capable of calculating a size of the smallestcharacter (for example, “D”) included in the document (in other words,the smallest character point) by multiplying the consecutive row numberscorresponding to the arrow A2 with the unit information.

Furthermore, in the same manner as the analysis along the row direction,the second analysis unit 58 also performs an analysis along the columndirection (in other words, calculations of Ycsum1 to YesumN which aresums of Y values of the respective pixels, identification of the numberof pixels (that is, consecutive column numbers) having the Yrsum equalto or smaller than a predetermined value, and the like). However, in theexample of the scan image 100 shown in FIG. 5, a major portion of pixelsof the N-number of columns (where N is an integer equal to or greaterthan 2) constituting scan data represents the natural image. Therefore,the consecutive column numbers become a significantly large value. Asshown, in a case where the consecutive column numbers assume asignificantly large value (in other words, in a case where theconsecutive column numbers exceed a predetermined threshold), the secondanalysis unit 58 judges in an analysis along the column direction that acharacter is not included in the document. However, as described above,since the smallest character point in an analysis along the rowdirection is calculated, the second analysis unit 58 adopts the smallestcharacter point as a result of the character analysis of S100.

Moreover, in a modification, for example, in a case where the characteranalysis of scan data representing a document only including a naturalimage is performed, the consecutive row numbers become a significantlylarge value, and the consecutive column numbers may also become asignificantly large value. In such a case, the second analysis unit 58judges that a character is not included in the document in both theanalysis along the row direction and the analysis along the columndirection. In this case, the second analysis unit 58 judges that acharacter is not included in the document as a result of the characteranalysis in S100. Moreover, in another modification, the smallestcharacter point may be calculated in the analysis along the rowdirection and the smallest character point may also be calculated in theanalysis along the column direction. In this case, the second analysisunit 58 adopts whichever is the smaller among the two smallest characterpoints as the result of the character analysis in S100.

After the character analysis of S100 in FIG. 4 is concluded, in S102,the judging unit 66 (refer to FIG. 1) judges whether a photo analysis inS106 is to be performed by the first analysis unit 56 (refer to FIG. 1)or not by utilizing the smallest character point obtained in thecharacter analysis in S100.

More specifically, the judging unit 66 judges that the photo analysis inS106 is not to be performed in a case where the smallest character pointis relatively small (in a case where 5 pt>smallest character point).Supposing that a relatively low output resolution is adopted in a casewhere the smallest character point is relatively small, the user is morelikely to recognize that image quality is low. Therefore, in the casewhere the smallest character point is relatively small, since it isobvious that a relatively high output resolution must be adopted evenwithout performing the photo analysis, in S102, the judging unit 66judges that the photo analysis is not to be performed.

On the other hand, while a relatively low output resolution may beadopted in a case where the smallest character point is relatively large(in a case where smallest character point≧5pt), the photo analysis mustbe further performed to judge whether such an output resolution isappropriate or not. Therefore, in the case where the smallest characterpoint is relatively large, in S102, the judging unit 66 judges that thephoto analysis is to be performed. Moreover, in the case where it isjudged that a character is not included in the document, the result ofthe character analysis alone is insufficient to appropriately determinethe output resolution. Therefore, in the case where it is judged that acharacter is not included in the document, in S102, the judging unit 66judges that the photo analysis is to be performed.

In the case where the judging unit 66 judges in S102 that the photoanalysis is to be performed, the judging unit 66 sets ON as a photoanalysis flag (not shown) in the memory 34, and in the case where it isjudged that the photo analysis is not to be performed, the judging unit66 sets OFF as the photo analysis flag.

Next, in S104, the judging unit 66 judges whether ON has been set as thephoto analysis flag or not. In the case where ON has been set as thephoto analysis flag (in the case of YES in S104), in S106, the analysisperforming unit 54 performs the photo analysis of the scan data. Morespecifically, in S106, the first analysis unit 56 performs the photoanalysis of the scan data to calculate an edge rate ER (refer to FIG. 6)that indicates a fineness of the document as the index value forclassifying a document including a natural image. Moreover, in the casewhere OFF has been set as the photo analysis flag (in the case of NO inS104), since the photo analysis in S106 is skipped, the first analysisunit 56 does not calculate the edge rate ER. In this case, processingload can be reduced.

(Photo Analysis of S106: FIG. 6)

Contents of the photo analysis of S106 in FIG. 4 will be described. Foreach of the plurality of pixels that constitute the scan data, the firstanalysis unit 56 determines whether the pixel is an edge pixel or anon-edge pixel, and calculates the edge rate ER that is a proportion ofthe edge pixels among the scan data. Moreover, an edge refers to aportion whose brightness (luminance) changes significantly in the image.Therefore, the edge pixel is a pixel having a luminance value thatsignificantly differs from surrounding pixels. Since discriminationmethods of the edge pixels and non-edge pixels are well known, contentsof the photo analysis will be briefly described herein.

As shown in FIG. 6, in S106, the first analysis unit 56 first createsthe YCC data by converting each of the plurality of pixels constitutingthe scan data (pixels represented by the RGB values) into a pixel in theYCC color space. Moreover, a known mathematical formula is utilized forthe conversion from RGB to YCC.

Next, the first analysis unit 56 applies a known filter fordiscriminating edge pixels from non-edge pixels (for example, a Sobelfilter or a Laplacian filter) to the YCC data. Accordingly, for each ofthe plurality of pixels, the first analysis unit 56 can determinewhether the pixel is the edge pixel (edge ON) or the non-edge pixel(edge OFF).

Next, the first analysis unit 56 divides the number of pixels determinedas the edge ON (in other words, the number of the edge pixels) by thetotal number of pixels constituting the YCC data (in other words, thetotal number of pixels constituting the scan data). The first analysisunit 56 then multiplies the value obtained by the division by 100 tocalculate the edge rate ER (%).

For example, a natural image with a relatively small amount of variationin brightness such as an ordinary scenery image (for example, mountains,sea, or the like) has a low edge rate ER. In other words, the naturalimage having a relatively low fineness has the low edge rate ER. On theother hand, a natural image with a relatively large amount of variationin brightness such as a natural image including a building or a naturalimage including a plurality of people has a high edge rate ER. In otherwords, the natural image having a relatively high fineness has the highedge rate ER. Therefore, the edge rate ER is an index value indicatingthe fineness of the document.

Moreover, in the present embodiment, as shown in FIG. 7 (to be describedlater), a document is classified into any of three fineness stages (highfineness, medium fineness, and low fineness) in correspondence with theedge rate ER. For example, the document representing the scan image 100shown in FIG. 5 includes a natural image with a relatively low fineness.However, the document representing the scan image 100 also includes aplurality of characters. Since a boundary between the character and thebackground has a large amount of variation in brightness, the number ofedge pixels increases if a character is included. Therefore, forexample, the document representing the scan image 100 may be classifiedin the medium fineness. Once the photo analysis of S106 in FIG. 4 isconcluded, a transfer is made to S108.

(Determination of Output Resolution: S108)

In S108, the output resolution determination unit 60 (refer to FIG. 1)determines the output resolution based on the result of the characteranalysis of S100 and the result of the photo analysis of S106 (in thecase where S106 is performed). In the case where the photo analysis ofS106 is performed, the output resolution determination unit 60determines the output resolution by utilizing the smallest characterpoint obtained in the character analysis of S100 and the edge rate ERobtained in the photo analysis of S106. On the other hand, in the casewhere the photo analysis of S106 is not performed, the output resolutiondetermination unit 60 determines the output resolution by utilizing onlythe smallest character point obtained in the character analysis of S100(in other words, not utilizing the edge rate ER).

More specifically, in S108, the optical resolution determination unit 60refers to an output resolution determination table 44 a (refer to FIG.7) included in the tables 40 in the memory 34 so as to determine theoutput resolution. As shown in FIG. 7, the output resolutiondetermination table 44 a is data representing a relationship among thesmallest character points, the edge rates ER, and the outputresolutions. Moreover, in the case where the determined opticalresolution (the optical resolution determined in S20 in FIG. 2) is 300dpi, the upper table in FIG. 7 is used, and in the case where thedetermined optical resolution is 600 dpi, the lower table in FIG. 7 isused. As described earlier, in the case where the smallest characterpoint<5 pt, the photo analysis is not performed. Therefore, in theoutput resolution determination table 44 a, a field of the photoanalysis result corresponding to the smallest character point<5 ptremains blank.

Data in the table 44 a is set so that the relatively smaller thesmallest character point, the relatively higher the output resolution,and the relatively larger the smallest character point, the relativelylower the output resolution. For example, in the case where the smallestcharacter point<5 pt in the table corresponding to determined opticalresolution=300 dpi, the same value (for example, 300 dpi) as thedetermined optical resolution is set as the output resolution. Inaddition, for example, in the case where 10.5 pt<the smallest characterpoint, a smaller value (for example, 100 dpi representing low fineness)than the same value as the determined optical resolution is set as theoutput resolution.

In a case where the smallest character point is relatively small, if theoutput resolution were low, the user is more likely to recognize thatthe image quality is low. Therefore, in the case where the smallestcharacter point is relatively small, a relatively high output resolutionis set so that the user does not receive a sense of low image quality.Moreover, in the present embodiment, data in the table 44 a is set sothat output resolution does not assume a larger value than a value thatis identical to the determined optical resolution in order to avoidhaving to perform an interpolation process of the image data. Therefore,in the case where the smallest character point<5 pt, the same value asthe determined optical resolution is set as the output resolution.Consequently, an extremely high output resolution can be adopted in thecase where the smallest character point<5 pt so that the user can beprevented from receiving the sense of low image quality. On the otherhand, in the case where the smallest character point is relativelylarge, even if the output resolution is low, the user is less likely torecognize that image quality is low. Therefore, in the case where thesmallest character point is relatively large, a relatively low outputresolution is set so that the data size of the object file does notbecome excessively large.

Moreover, in the table 44 a, no character is classified in a samecategory as 10.5 pt<smallest character point. Therefore, in the casewhere the result of the character analysis is no character, anappropriate output resolution in correspondence with the result of thephoto analysis (in other words, the fineness of the document) isdetermined.

In addition, the data in the table 44 a is set so that the relativelyhigher the edge rate ER, the relatively higher the output resolution,and the relatively lower the edge rate ER, the relatively lower theoutput resolution. For example, in the case of the high finenesscorresponding to the edge rate ER>2.8 in a table corresponding todetermined optical resolution=300 dpi, the same value (for example, 300dpi) as the determined optical resolution is set as the outputresolution. In addition, for example, in the case of the medium finenesscorresponding to 1.0≦the edge rate ER>2.8, a smaller value (for example,200 dpi) than the same value as the determined optical resolution is setas the output resolution.

In the case where the document has a relatively high fineness, if theoutput resolution were low, the user is more likely to recognize thatthe image quality is low. Therefore, in the case where the document hasthe relatively high fineness, a relatively high output resolution is setso that the user does not receive the sense of low image quality. Inparticular, in a case where the edge rate ER>2.8 (in other words, in acase of high fineness), the same value (for example, 300 dpi) as thedetermined optical resolution is set as the output resolution.Consequently, an extremely high output resolution can be adopted in thecase where the edge rate ER>2.8 so that the user can be prevented fromreceiving the sense of low image quality. On the other hand, in the casewhere the document has a relatively low fineness, even if the outputresolution is low, the user is less likely to recognize that the imagequality is low. Therefore, in the case where the document has therelatively low fineness, a relatively low output resolution is set sothat the data size of the object file does not become excessively large.

Moreover, the data in the table 44 a is set so that even if the smallestcharacter point is the same, output resolutions differ in a case wherethe fineness differs. For example, with the table corresponding todetermined optical resolution=300 dpi, in the case where 5 pt≦thesmallest character point≦10.5 pt, the output resolution corresponding tothe high fineness (300 dpi) and the output resolution corresponding tothe medium fineness (200 dpi) differ from each other. According to thisconfiguration, the multi-function device 10 is capable of appropriatelydetermining the output resolution in accordance with the fineness of thedocument in the case where the smallest character point is the same.

Moreover, the data in the table 44 a is set so that even if the finenessis the same, output resolutions differ in a case where the smallestcharacter point differs. For example, with the table corresponding tothe determined optical resolution=300 dpi, in the case of the lowfineness, the output resolution corresponding to 5 pt≦the smallestcharacter point≦10.5 pt (200 dpi) and the output resolutioncorresponding to 10.5 pt≦the smallest character point (100 dpi) differfrom each other. According to this configuration, the multi-functiondevice 10 is capable of appropriately determining the output resolutionin accordance with the smallest character point in a case where thefineness of the document is the same.

In S108, the output resolution determination unit 60 determines theoutput resolution by identifying the output resolution corresponding tothe determined optical resolution, the smallest character point, and theedge rate ER from the output resolution determination table 44 a.Accordingly, the output resolution determination unit 60 is capable ofappropriately determining the output resolution. Once S108 is concluded,the analysis process is concluded. As described earlier, in S26 of FIG.2, the object file including the image data indicating the outputresolution determined in S108 is created. Therefore, the user is able toutilize the object file including the image data indicating anappropriate output resolution (for example, output the image).

Advantageous Effect of Present Embodiment

According to the present embodiment, the multi-function device 10 iscapable of appropriately determining the optical resolution to beutilized in the actual scan by utilizing the file size and the fileformat given from the user. In other words, as shown in FIG. 3, whilethe optical resolution of 600 dpi that is the highest value may bedetermined, the optical resolution of 300 dpi may also be determined.When the relatively low optical resolution of 300 dpi is determined, thescan of the document can be performed at a relatively high speed, andthe difference between the optical resolution and the output resolutioncan be prevented from becoming large. Supposing that the differencebetween the optical resolution and the output resolution increases, alonger time is required for the process (in other words, the resizeprocess) for converting the scan data indicating the optical resolutioninto the image data indicating the output resolution. In the presentembodiment, since the optical resolution of 300 dpi may be determined,the processing load may be reduced, and the period of time between thescan of the document and the creation of the object file may beshortened.

In addition, in the present embodiment, the multi-function device 10 iscapable of appropriately determining the output resolution based on theresult of the analysis of the scan data. Therefore, the multi-functiondevice 10 is capable of appropriately determining both the opticalresolution and the output resolution.

In particular, the multi-function device 10 determines the outputresolution by utilizing the edge rate ER for classifying the documentincluding the natural image or, in other words, by utilizing the edgerate ER for classifying the document from the perspective of fineness.Therefore, the multi-function device 10 is capable of appropriatelydetermining the output resolution for the scan data representing thedocument including the natural image.

(Correspondence Relationship)

The controlling unit 30 of the multi-function device 10 is an example ofa “controlling device”. The selected file size and the selected fileformat are examples of “specific information”. For example, the “small”file size and the “large” file size are, respectively, examples of a“first file size” and a “second file size”. In this case, 300 dpi and600 dpi are, respectively, examples of a “first optical resolution” anda “second optical resolution”. In addition, “XPS” and “JPEG” are,respectively, examples of a “first file format” and a “second fileformat”. In this case, 300 dpi and 600 dpi are, respectively, examplesof a “third optical resolution” and a “fourth optical resolution”.Furthermore, the edge rate ER and the smallest character point are,respectively, examples of a “first index value” and a “second indexvalue”. Moreover, in the table corresponding to the opticalresolution=300 dpi shown in FIG. 7, 300 dpi corresponding to the highfineness, 200 dpi corresponding to both the medium fineness and 5 pt≦thesmallest character point<10.5 pt, and 100 dpi corresponding to both thelow fineness and 10.5 pt<the smallest character point are, respectively,examples of a “first value”, a “second value”, and a “third value”.

Second Embodiment

In the present embodiment, in S24 of FIG. 2, an analysis process of FIG.8 is performed in place of the analysis process of FIG. 4. In S200, foreach of a character analysis and a photo analysis, the judging unit 66judges whether the analysis is to be performed or not based on acombination of which of an ADF scan or an FB scan is performed and theselected file format stored in the scan setting storage area 36.

More specifically, in S200, the judging unit 66 refers to an analysisperforming determination table 46 (refer to FIG. 9) included in thetables 40 in the memory 34 so as to determine whether each of thecharacter analysis and the photo analysis is to be performed or not. Asshown in FIG. 9, the analysis performing determination table 46 is datarepresenting a relationship among a document setting position (in otherwords, the ADF scan or the FB scan), a selected file format, whether thecharacter analysis is to be performed or not (ON or OFF), and whetherthe photo analysis is to be performed or not (ON or OFF). Moreover,while a remarks column is provided in FIG. 9 to facilitate technicalunderstanding, the actual data does not include the remarks column.

(ADF/FB)

Normally, a user is likely to desire performing the ADF scan on adocument including a character and is likely to desire performing the FBscan on a photograph or the like that represents a natural image.Therefore, in the case where the user desires to perform the ADF scan,the document is likely to include a character. To this end, in the casewhere the ADF scan is to be performed, the character analysis forcalculating the smallest character point that is an index valueindicating a configuration of the character included in the document isfavorably performed. On the other hand, in the case where the userdesires to perform the FB scan, the document is likely to include anatural image. Therefore, in the case where the FB scan is to beperformed, the photo analysis for calculating an edge rate ER that is anindex value for classifying a document including a natural image isfavorably performed.

(JPEG)

In particular, in a case where the user desires to perform the FB scanby selecting JPEG that is a file format not having a page concept, it islikely that the document does not include a character (in other words,the document is likely to be a photograph or the like that only includesthe natural image). In consideration thereof, as indicated by (Note 1)and (Note 2), data in the table 46 is set so that, in a case where theselected file format is JPEG, the character analysis is performed(character analysis=ON) when the ADF scan is performed, the characteranalysis is not performed (character analysis=OFF) when the FB scan isperformed. According to this configuration, the multi-function device 10is capable of appropriately determining the output resolution byutilizing the result of the character analysis in the case where the ADFscan is performed. On the other hand, since the multi-function device 10does not perform the character analysis in the case where the FB scan isperformed, the multi-function device 10 is capable of reducing theprocessing load.

Moreover, in a case where the document includes a natural image, theuser is likely to select JPEG that is a file format not having the pageconcept instead of selecting XPS or PDF. Therefore, the data in thetable 46 is set so that the photo analysis is performed regardless ofwhich of the ADF scan and the FB scan is performed in the case where theselected file format is JPEG.

(XPS, PDF)

In addition, in a case where the user desires to perform the ADF scanwhile selecting XPS or PDF that is a file format having the pageconcept, it is likely that the document does not include a natural image(in other words, the document is likely to be a text that only includescharacters). In consideration thereof, as indicated by (Note 3) and(Note 4), the data in the table 46 is set so that, in the case where theselected file format is XPS or PDF, the photo analysis is performed(photo analysis=ON) when the FB scan is performed, the photo analysis isnot performed (photo analysis=OFF) when the ADF scan is performed.According to this configuration, the multi-function device 10 is capableof appropriately determining the output resolution by utilizing theresult of the photo analysis in the case where the FB scan is performed.On the other hand, since the multi-function device 10 does not performthe photo analysis in the case where the ADF scan is performed, themulti-function device 10 is capable of reducing processing load.

Moreover, in the case where the document includes a character, the useris likely to select XPS or PDF that is the file format having the pageconcept instead of selecting NEG. Therefore, the data in the table 46 isset so that the character analysis is performed regardless of which ofthe ADF scan and the FB scan is performed in the case where the selectedfile format is XPS or PDF.

(PDF/A)

In the case where the user selects PDF/A, it is likely that the userdesires to save image data on a long-term basis. In other words, in acase where PDF/A is selected, it is likely that the document that isimportant to the user is to be scanned. Therefore, in the case where theselected file format is PDF/A, a high output resolution having the samevalue as the optical resolution is favorably determined even withoutperforming the character analysis and the photo analysis. Inconsideration thereof, as indicated by (Note 5), the data in the table46 is set so that in the case where the selected file format is PDF/A,neither the character analysis nor the photo analysis is performed.According to this configuration, since the multi-function device 10performs neither the character analysis nor the photo analysis in thecase where PDF/A is selected, the multi-function device 10 is capable ofreducing the processing load.

(Signature Enclosed PDF)

For example, rules of specific Japanese ministries recommend that a highresolution equal to or higher than 300 dpi be set for Signature EnclosedPDF. Therefore, in a case where the selected file format is SignatureEnclosed PDF, a high output resolution equal to or higher than 300 dpiis favorably determined even without performing the character analysisand the photo analysis. In the present embodiment, in the case where theselected file format is Signature Enclosed PDF, a high output resolutionhaving the same value as the optical resolution is determined. Moreover,in a modification, in the case where the selected file format isSignature Enclosed PDF, a smaller value than the value that is identicalto the optical resolution (however, a value equal to or greater than 300dpi) may be determined as the output resolution. In considerationthereof, as indicated by (Note 6), the data in the table 46 is set sothat in the case where the selected file format is Signature EnclosedPDF, neither the character analysis nor the photo analysis is performed.According to this configuration, since the multi-function device 10performs neither the character analysis nor the photo analysis in thecase where Signature Enclosed PDF is selected, the multi-function device10 is capable of reducing the processing load.

(Other File Formats)

Moreover, in a case where Encryption PDF or Searchable PDF is selected,it is likely that the document includes a character and does not includea natural image. Therefore, the data in the table 46 is set so that thecharacter analysis is performed but the photo analysis is not performedregardless of which of the ADF scan and the FB scan is performed in thecase where the selected file format is Encryption PDF or Searchable PDF.

In addition, regardless of the document type, in a case where the userdesires to reduce data size of the object file, high-compression PDF canbe selected. Therefore, in the case where high-compression PDF isselected, the document may include a character and may also include anatural image. As such, the data in the table 46 is set so that both thecharacter analysis and the photo analysis are performed regardless ofwhich of the ADF scan and the FB scan is performed in the case where theselected file format is high-compression PDF.

In S200, the judging unit 66 judges whether the character analysis is tobe performed or not and whether the photo analysis is to be performed ornot by identifying a type of scan (ADF scan or FB scan) and informationcorresponding to the selected file format (character analysis ON/OFF,photo analysis=ON/OFF) from the analysis performing determination table46. In S200, in correspondence with the result of the judgment onwhether the character analysis is to be performed or not, the judgingunit 66 sets ON or OFF as a character analysis flag (not shown) in thememory 34. In a similar manner, in correspondence with the result of thejudgment on whether the photo analysis is to be performed or not, thejudging unit 66 sets ON or OFF as a photo analysis flag (not shown) inthe memory 34.

Next, in S202, the judging unit 66 judges whether ON has been set as thecharacter analysis flag or not. In a case where ON has been set as thecharacter analysis flag (in the case of YES in S202), in S204, thesecond analysis unit 58 performs the character analysis of the scandata. Contents of the character analysis are similar to those in thefirst embodiment. Moreover, in a case where OFF has been set as thecharacter analysis flag (in the case of NO in S202), since the characteranalysis in S204 is skipped, the processing load can be reduced.

Next, in S206, the judging unit 66 judges whether ON has been set as thephoto analysis flag or not. In a case where ON has been set as the photoanalysis flag (in the case of YES in S206), in S208, the first analysisunit 56 performs the photo analysis of the scan data. Contents of thephoto analysis are similar to those in the first embodiment. Moreover,in a case where OFF has been set as the photo analysis flag (in the caseof NO in S206), since the photo analysis in S208 is skipped, theprocessing load can be reduced.

Next, in S210, the output resolution determination unit 60 determinesthe output resolution. In the case where both the character analysis inS204 and the photo analysis in S206 have been performed, the outputresolution determination unit 60 determines the output resolution byreferring to the table 44 a shown in FIG. 7 and utilizing both theresult of the character analysis (in other words, the smallest characterpoint) and the result of the photo analysis (in other words, the edgerate ER). In the case where only the character analysis in S204 isperformed, the output resolution determination unit 60 determines theoutput resolution by referring to the table 44 b shown in FIG. 10 andutilizing the result of the character analysis without utilizing theresult of the photo analysis. In the case where only the photo analysisin S208 is performed, the output resolution determination unit 60determines the output resolution by referring to the table 44 b shown inFIG. 10 and utilizing the result of the photo analysis without utilizingthe result of the character analysis.

Moreover, in the same manner as the data in the table 44 a shown in FIG.7, the data in the table 44 b shown in FIG. 10 is set so that therelatively smaller the smallest character point, the relatively higherthe output resolution, and the relatively larger the smallest characterpoint, the relatively lower the output resolution. Furthermore, in thetable 44 b, no character is classified in a same category as 10.5 pt<thesmallest character point. In addition, the data in the table 44 b is setso that the relatively higher the edge rate ER, the relatively higherthe output resolution, and the relatively lower the edge rate ER, therelatively lower the output resolution.

Furthermore, as described earlier, neither the character analysis northe photo analysis is performed in the case where the selected fileformat is PDF/A or Signature Enclosed PDF (refer to (Note 5) and (Note6) in FIG. 9). In this case, the output resolution determination unit 60determines the output resolution by utilizing neither the result of thecharacter analysis nor the result of the photo analysis. In other words,the output resolution determination unit 60 determines a value that isidentical to the optical resolution as the output resolution in the casewhere the selected file format is PDF/A or Signature Enclosed PDF.According to this configuration, the multi-function device 10 is capableof appropriately determining the output resolution in the case wherePDF/A or Signature Enclosed PDF is selected.

Advantageous Effect of Second Embodiment

In the present embodiment, in the same manner as in the firstembodiment, the multi-function device 10 is capable of appropriatelydetermining the optical resolution to be utilized in the actual scan byutilizing the file size and the file format given from the user (S20 inFIG. 2), and is also capable of appropriately determining the outputresolution based on the result of the analysis of the scan data (theanalysis processes in FIG. 9). Therefore, the multi-function device 10is capable of appropriately determining both the optical resolution andthe output resolution. In addition, the multi-function device 10 iscapable of appropriately determining the output resolution for the scandata representing the document including the natural image.

In particular, the multi-function device 10 is capable of appropriatelyjudging whether each of the character analysis and the photo analysis isto be performed or not based on which of the ADF scan and the FB scan isto be performed and based on which file format is to be selected. In thecase where it is judged that the character analysis is to be performed,the multi-function device 10 is capable of performing the characteranalysis and appropriately determining the output resolution byutilizing the result of the character analysis. In a similar manner, inthe case where it is judged that the photo analysis is to be performed,the multi-function device 10 is capable of performing the photo analysisand appropriately determining the output resolution by utilizing theresult of the photo analysis. On the other hand, since themulti-function device 10 does not perform the character analysis and/orthe photo analysis in the case where it is judged that the characteranalysis and/or the photo analysis are not to be performed, themulti-function device 10 is capable of reducing the processing load.

(First Modification)

In the first and second embodiments, the user operates the operationunit 12 of the multi-function device 10 to input an instruction forperforming the scan to the multi-function device 10. In other words, thefirst and second embodiments are embodiments of a so-called push scan.Alternatively, after placing the document at the predetermined positionof the multi-function device 10, the user may operate an operation unit(not shown) of the PC 80 to input the instruction to perform the scan tothe PC 80. In this case, the PC 80 transmits the instruction to performthe scan to the multi-function device 10 in accordance with the scannerdriver 96. In other words, in the present modification, a so-called pullscan is performed. In the present modification, the respective units 50to 66 may be realized by a CPU (not shown) of the PC 80 by executingprocesses in accordance with the scanner driver 96. In other words, thePC 80 may comprise the plurality of units 50 to 66. In this case, therespective determination units 50, 60 and the judging unit 66 of the PC80 may determine an optical resolution, determine an output resolution,judge performance of a character analysis, and judge performance of aphoto analysis by utilizing tables 40 included in the scanner driver 96.In the present modification, the multi-function device 10 and the PC 80are, respectively, examples of a “scan performing unit” and a“controlling device”.

(Second Modification)

A portion of units among the plurality of units 50 to 66 may be realizedby the multi-function device 10 by executing processes in accordancewith a program in the memory 34, and other units of the plurality ofunits 50 to 66 may be realized by the CPU of the PC 80 by executing theprocesses in accordance with the scanner driver 96. In the presentmodification, a combination of the controlling unit 30 of themulti-function device 10 and the PC 80 is an example of a “controllingdevice”. In other words, in general terms, the “controlling device” maybe realized by a single device as is the case in the respectiveembodiments and the first modification described above, or may berealized by a combination of two or more devices as is the case in thepresent modification.

(Third Modification)

In the respective embodiments described above, the smallest characterpoint is calculated in the character analysis. Alternatively, thecharacter analysis may calculate an index value indicating a thinness ofthe character included in the document, an index value indicating acolor of the character included in the document, or an index valueindicating a concentration of the character included in the document. Inother words, the second analysis unit 58 need only calculate the indexvalue indicating the configuration of the character included in thedocument.

(Fourth Modification)

In the respective embodiments described above, the edge rate ER thatindicates the fineness of the document is calculated in the photoanalysis. Alternatively, instead of the index value that indicates thefineness of the document, for example, an index value indicating whethera person is included in the natural image or not may be calculated inthe photo analysis. Specifically, the first analysis unit 56 may judgethat a person is included in the natural image in a case where there area predetermined number or more of a specific pixel (in other words, apixel indicating both “a hue of x or higher and y or lower” and “achroma of a or higher and b or lower”) among the plurality of pixelsconstituting the scan data, and judges that a person is not included inthe natural image in a case where there is not a predetermined number ormore of the specific pixel. In addition, in a case where it is judgedthat a person is included in the natural image, the output resolutiondetermination unit 60 may determine the output resolution in the samemanner as the “high fineness” in the respective embodiments, and in thecase where it is judged that a person is not included in the naturalimage, the output resolution determination unit 60 may determine theoutput resolution in the same manner as the “low fineness” in therespective embodiments. Furthermore, in another modification, the firstanalysis unit 56 may calculate an index value that indicates the numberof colors included (how many different colors are being utilized) in thenatural image. In addition, in a case where the number of colorsincluded in the natural image is equal to or greater than apredetermined number, the output resolution determination unit 60 maydetermine the output resolution in the same manner as the “highfineness” in the respective embodiments, and in a case where the numberof colors included in the natural image is smaller than thepredetermined number, the output resolution determination unit 60 maydetermine the output resolution in the same manner as the “low fineness”in the respective embodiments. As shown, the first analysis unit 56 needonly calculate the index value for classifying the document includingthe natural image.

(Fifth Modification)

In the first embodiment, the second analysis unit 58 performs thecharacter analysis and, subsequently, the first analysis unit 56performs the photo analysis. Alternatively, the first analysis unit 56may perform the photo analysis and, subsequently, the second analysisunit 58 may perform the character analysis.

(Sixth Modification)

In the respective embodiments described above, the character analysisand the photo analysis are performed. Alternatively, only the characteranalysis may be performed without performing the photo analysis (inother words, S102 to S106 in FIG. 4 may be omitted), or only the photoanalysis may be performed without performing the character analysis (inother words, S100 to S104 in FIG. 4 may be omitted). In addition, threeor more types of analyses including other types of analyses may beperformed. In general terms, the analysis performing unit 54 need onlyperform the analysis of the scan data obtained by the scan of thedocument.

(Seventh Modification)

In the respective embodiments described above, “PDF” or “XPS” is anexample of a “first file format”. Alternatively, the “first file format”may be another file format having a page concept (for example, TIFF orIPEGXR). In addition, in the respective embodiments described above,“JPEG” is an example of a “second file format”. Alternatively, the“second file format” may be another file format not having a pageconcept (for example, PNG).

(Eighth Modification)

In the respective embodiments described above, in S20 in FIG. 2, theoptical resolution determination unit 50 determines the opticalresolution in correspondence with the selected file format and theselected file size. Alternatively, the optical resolution determinationunit 50 may determine the optical resolution only in correspondence withthe selected file format or may determine the optical resolution only incorrespondence with the selected file size. Furthermore, in addition tothe selected file format and/or the selected file size, the opticalresolution determination unit 50 may determine the optical resolution infurther correspondence with other information (for example, adestination of the object file selected by a user). In general terms,the optical resolution determination unit 50 need only determine theoptical resolution by utilizing information given by the user.

(Ninth Modification)

In the respective embodiments described above, the respective functionsof the plurality of units 50 to 66 are realized by the CPU 32 of themulti-function device 10 by executing processes in accordance with aprogram. However, at least one unit among the plurality of units 50 to66 may be realized by hardware such as a logic circuit.

The invention claimed is:
 1. A controlling device for controlling a scanperforming unit comprising a plurality of optical elements, thecontrolling device comprising: one or more processors; and a memory thatstores a computer program including instructions executed by the one ormore processors, wherein the instructions cause the one or moreprocessors, when executed by the one or more processors, to function as:an optical resolution determination unit configured to determine aspecific optical resolution from among a plurality of opticalresolutions by utilizing specific information given from an externalsource, the specific information including one file format selected bythe external source from among a plurality of file formats, theplurality of optical resolutions being resolutions that the plurality ofoptical elements is capable of utilizing for executing a scan, thespecific optical resolution being a resolution that the plurality ofoptical elements is to utilize for executing a scan of a target documentwhich is a scan target at this time; a scan controlling unit configuredto cause the scan performing unit to perform the scan of the targetdocument in accordance with the specific optical resolution; an analysisperforming unit configured to perform an analysis of scan data obtainedby the scan of the target document; an output resolution determinationunit configured to determine an output resolution based on a result ofthe analysis of the scan data, the output resolution being a resolutionfor image data obtained by utilizing the scan data; a conversion unitconfigured to convert the scan data indicating the specific opticalresolution into the image data indicating the output resolution in acase where the output resolution is not identical to the specificoptical resolution; and a creation unit configured to create a fileincluding the image data indicating the output resolution, the filehaving the selected one file format, and wherein the optical resolutiondetermination unit is configured to: determine a first opticalresolution from among the plurality of optical resolutions as thespecific optical resolution in a case where the selected one file formatindicates a first file format, the first file format being a file formathaving a page concept; and determine a second optical resolution fromamong the plurality of optical resolutions as the specific opticalresolution in a case where the selected one file format indicates asecond file format that is different from the first file format, thesecond file format being a file format not having a page concept, thefirst optical resolution being lower than the second optical resolution.2. The controlling device as in claim 1, wherein the specificinformation further includes one file size selected by the externalsource as a file size of the file from among a plurality of file sizes,and the optical resolution determination unit is configured to:determine the first optical resolution from among the plurality ofoptical resolutions as the specific optical resolution in a case wherethe selected one file size indicates a first file size and the selectedone file format indicates the first file format; determine the secondoptical resolution from among the plurality of optical resolutions asthe specific optical resolution in a case where the selected one filesize indicates the first file size and the selected one file formatindicates the second file format; determine a third optical resolutionfrom among the plurality of optical resolutions as the specific opticalresolution in a case where the selected one file size indicates a secondfile size, which is larger than the first file size, and the selectedone file format indicates the first file format; and determine a fourthoptical resolution from among the plurality of optical resolutions asthe specific optical resolution in a case where the selected one filesize indicates the second file size and the one file format indicatesthe second file format, the fourth optical resolution being differentfrom the third optical resolution.
 3. The controlling device as in claim1, wherein the analysis performing unit comprises a first analysis unitconfigured to calculate, by utilizing the scan data, a first type ofindex value for classifying the target document including a naturalimage, and the output resolution determination unit is configured todetermine the output resolution by utilizing the first type of indexvalue.
 4. The controlling device as in claim 3, wherein the first typeof index value is an index value indicating a fineness of the document,and the output resolution determination unit is configured to: determinea first value as the output resolution in a case where the first type ofindex value indicates that the target document has a relatively highfineness, the first value being equal to or lower than the specificoptical resolution; and determine a second value as the outputresolution in a case where the first type of index value indicates thatthe target document has a relatively low fineness, the second valuebeing lower than the first value.
 5. The controlling device as in claim3, wherein the analysis performing unit further comprises a secondanalysis unit configured to calculate, by utilizing the scan data, asecond type of index value indicating a configuration of a characterincluded in the target document, and the output resolution determinationunit is configured to determine the output resolution by utilizing thefirst type of index value and the second type of index value.
 6. Thecontrolling device as in claim 5, wherein the first type of index valueis an index value indicating a fineness of the target document, and thesecond type of index value is an index value indicating a size of thesmallest character included in the target document, the outputresolution determination unit is configured to: determine a first valueas the output resolution in a case where the first type of index valueindicates that the target document has a relatively high fineness, thefirst value being equal to or lower than the specific opticalresolution; determine a second value as the output resolution in a casewhere the first type of index value indicates that the target documenthas a relatively low fineness, and the second type of index valueindicates that the size of the smallest character included in the targetdocument is a relatively small size, the second value being lower thanthe first value; and determine a third value as the output resolution ina case where the first type of index value indicates that the targetdocument has a relatively low fineness, and the second type of indexvalue indicates that the size of the smallest character included in thetarget document is a relatively large size, the third value being lowerthan the second value.
 7. A controlling device for controlling a scanperforming unit comprising a plurality of optical elements, thecontrolling device comprising: an optical resolution determination unitconfigured to determine a specific optical resolution from among aplurality of optical resolutions by utilizing specific information givenfrom an external source, the specific information including one fileformat selected by the external source from among a plurality of fileformats, the plurality of optical resolutions being resolutions that theplurality of optical elements is capable of utilizing for executing ascan, the specific optical resolution being a resolution that theplurality of optical elements is to utilize for executing a scan of atarget document which is a scan target at this time; a scan controllingunit configured to cause the scan performing unit to perform the scan ofthe target document in accordance with the specific optical resolution;an analysis performing unit configured to perform an analysis of scandata obtained by the scan of the target document; an output resolutiondetermination unit configured to determine an output resolution based ona result of the analysis of the scan data, the output resolution being aresolution for image data obtained by utilizing the scan data; aconversion unit configured to convert the scan data indicating thespecific optical resolution into the image data indicating the outputresolution in a case where the output resolution is not identical to thespecific optical resolution; and a creation unit configured to create afile including the image data indicating the output resolution, the filehaving the selected one file format, wherein the optical resolutiondetermination unit is configured to: determine a first opticalresolution from among the plurality of optical resolutions as thespecific optical resolution in a case where the selected one file formatindicates a first file format, the first file format being a file formathaving a page concept; and determine a second optical resolution fromamong the plurality of optical resolutions as the specific opticalresolution in a case where the selected one file format indicates asecond file format which is different from the first file format, thesecond file format being a file format not having a page concept, thefirst optical resolution being lower than the second optical resolution.8. A non-transitory computer-readable storage medium storing a computerprogram for a controlling device for controlling a scan performing unitcomprising a plurality of optical elements, the computer programincluding instructions executed by one or more processors mounted on thecontrolling device, the instructions causing the one or more processors,when executed by the one or more processors, to execute processescomprising: determining a specific optical resolution from among aplurality of optical resolutions by utilizing specific information givenfrom an external source, the specific information including one fileformat selected by the external source from among a plurality of fileformats, the plurality of optical resolutions being resolutions that theplurality of optical elements is capable of utilizing for executing ascan, the specific optical resolution being a resolution that theplurality of optical elements is to utilize for executing a scan of atarget document which is a scan target at this time; causing the scanperforming unit to perform the scan of the target document in accordancewith the specific optical resolution; performing an analysis of scandata obtained by the scan of the target document; determining an outputresolution based on a result of the analysis of the scan data, theoutput resolution being a resolution for image data obtained byutilizing the scan data; converting the scan data indicating thespecific optical resolution into the image data indicating the outputresolution in a case where the output resolution is not identical to thespecific optical resolution; and creating a file including the imagedata indicating the output resolution, the file having the selected onefile format, wherein the determining of the specific optical resolutionfrom among the plurality of optical resolutions by utilizing thespecific information given from the external source comprises:determining a first optical resolution from among the plurality ofoptical resolutions as the specific optical resolution in a case wherethe selected one file format indicates a first file format, the firstfile format being a file format having a page concept; and determining asecond optical resolution from among the plurality of opticalresolutions as the specific optical resolution in a case where theselected one file format indicates a second file format which isdifferent from the first file format, the second file format being afile format not having the page concept, the first optical resolutionbeing lower than the second optical resolution.